package com.lemon.exam.repository;

import com.lemon.exam.entity.po.GradePO;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import reactor.core.publisher.Flux;

import java.util.List;


/**
 * 年级表 数据访问接口
 *
 * @author Lemon
 * @since 2025/04/20 22:06:24
 */
public interface GradeRepository extends R2dbcRepository<GradePO, Long> {
    @Query("SELECT id, name FROM biz_grade WHERE deleted = 0")
    Flux<GradePO> findGradeIdGradeName();

    @Query("SELECT id, name FROM biz_grade WHERE deleted = 0 AND id IN (:gradeIdList)")
    Flux<GradePO> findGradeIdGradeNameByGradeId(List<Long> gradeIdList);
}
